<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" layout:decorate="main"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <title>服务类型管理</title>
</head>
<body>
<div layout:fragment="content">
    <div class="">
        <div class="clearfix"></div>
        <div class="row">
            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>编辑数据字典 <i class="fa fa-user"></i></h2>
                        <div class="clearfix"></div>
                    </div>
                    <div class="x_content">
                        <div class="clearfix"></div>
                        <form class="form-horizontal form-label-left" th:action="@{/dict/update}" action="/dict/update" method="post">
                            <input type="hidden" name="dictId"  th:value="${dict.dictId}" />
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="dictType">字典类型<span class="required"></span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input id="dictType" class="form-control col-md-7 col-xs-12"
                                           data-validate-length-range="10" data-validate-words="1" name="dictType" required="required"
                                           placeholder="请输入值" type="text" th:value="${dict.dictType}"/>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="dictItem">字典名称<span class="required"></span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input id="dictItem" class="form-control col-md-7 col-xs-12"
                                           data-validate-length-range="10" data-validate-words="1" name="dictItem" required="required"
                                           placeholder="请输入值" type="text" th:value="${dict.dictItem}"/>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="dictValue">字典值<span class="required"></span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input id="dictValue" class="form-control col-md-7 col-xs-12"
                                           data-validate-length-range="10" data-validate-words="1" name="dictValue" required="required"
                                           placeholder="请输入值" type="text" th:value="${dict.dictValue}"/>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-md-6 col-md-offset-3">
                                    <button id="send" type="submit" class="btn btn-success">保存</button>
                                    <button type="button" class="btn btn-primary" id="back">返回</button>
                                    <br/><br/>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script layout:fragment="js">
    $(document).ready(function(){
        $("#back").on("click",function(){
            window.history.back();
        });
    });
</script>
</html>